
using System;
using System.Collections;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
 // ERROR: Not supported in C#: OptionDeclaration
namespace NCS_CS
{
	internal partial class frmChangePWD : System.Windows.Forms.Form
	{


		public bool LoginSucceeded;
		private void cmdCancel_Click(System.Object eventSender, System.EventArgs eventArgs)
		{
			//设置全局变量为 false
			//不提示失败的登录
			LoginSucceeded = false;
			this.Hide();
		}

		private void cmdOK_Click(System.Object eventSender, System.EventArgs eventArgs)
		{
			//检查正确的密码
			if (txtPassword.Text == txtUserName.Text) {
				//将代码放在这里传递
				//成功到 calling 函数
				//设置全局变量时最容易的
				LoginSucceeded = true;
				this.Hide();
			} else {
				MessageBox.Show("无效的密码，请重试!",  "登录");
				txtPassword.Focus();
				System.Windows.Forms.SendKeys.Send("{Home}+{End}");
			}
		}

		private void frmLogin1_Load(System.Object eventSender, System.EventArgs eventArgs)
		{
			//UPGRADE_ISSUE: Global method LoadResPicture was not upgraded. Click for more: 'ms-help://MS.VSExpressCC.v80/dv_commoner/local/redirect.htm?keyword="6B85A2A7-FE9F-4FBE-AA0C-CF11AC86A305"'
			//Me.Icon = VB6.LoadResPicture("ncscs", VB6.LoadResConstants.ResIcon)
		}
	}
}
